home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac: Not for Sale / Another.not.for.sale (Australia).iso / fade into you / getting there / TCP⁄PPP⁄SLIP / Scripts / InterSLIP⁄Supra script / Supra v.32bis⁄SLIP < prev   
Encoding:
Text File  |  1994-01-04  |  3.6 KB  |  221 lines  |  [mlts/slnk]

  1. ! "SupraFAXModem V.32bis"
  2. !
  3. !    Modified for InterSLIP and Supra v.32bis, Al Heynneman, 12/93
  4. !
  5. !    changed serial port reset to 38400
  6. !    enabled modem error correction and data compression
  7. !    added PAUSE 30 before change to hardware handshaking to cure disconnects
  8. !    added NOTE descriptions for all error conditions
  9. !    added SOUND for all error conditions, see extra sound files
  10. !
  11. @ORIGINATE
  12. @ANSWER
  13. !
  14. @LABEL 1
  15. serreset 38400, 0, 8, 1
  16. !
  17. matchclr
  18. matchstr 1 4 "OK\13\10"
  19. write "AT &F1 W1 \13"    ! error correction, data compression
  20. matchread 30
  21. jump 59
  22. !
  23. ! Next, Set up the configuration:
  24. !                Turn off auto answer and echo
  25. !
  26. @LABEL 4
  27. pause 5
  28. matchstr 1 6 "OK\13\10"
  29. write "AT S0=0 E0 \13"
  30. matchread 30
  31. jump 59
  32. !
  33. ! If speaker on flag is true, 
  34. @LABEL 6
  35. ifstr 2 8 "1"
  36. matchstr 1 8 "OK\13\10"
  37. write "AT M0\13"
  38. matchread 30
  39. jump 59
  40. !
  41. ! The modem is ready so enable answering, or originate a call
  42. !
  43. @LABEL 8
  44. pause 5
  45. ifANSWER 30
  46. note "Dialing ^1" 3
  47. write "AT S0=0 DT^1\13"
  48. !
  49. @LABEL 9
  50. matchstr 1 11 "CARRIER 1200\13\10"
  51. matchstr 2 12 "CARRIER 2400\13\10"
  52. matchstr 3 13 "CARRIER 4800\13\10"
  53. matchstr 4 14 "CARRIER 7200\13\10"
  54. matchstr 5 15 "CARRIER 9600\13\10"
  55. matchstr 6 16 "CARRIER 12000\13\10"
  56. matchstr 7 17 "CARRIER 14400\13\10"
  57. matchstr 8 50 "NO CARRIER\13\10"
  58. matchstr 9 50 "ERROR\13\10"
  59. matchstr 10 52 "NO DIALTONE\13\10"
  60. matchstr 11 53 "BUSY\13\10"
  61. matchstr 12 54 "NO ANSWER\13\10"
  62. matchread 700
  63. jump 59
  64. !
  65. @LABEL 11
  66. note "Communicating at 1200 bps" 2
  67. CommunicatingAt 1200
  68. jump 20
  69. !
  70. @LABEL 12
  71. note "Communicating at 2400 bps" 2
  72. CommunicatingAt 2400
  73. jump 20
  74. !
  75. @LABEL 13
  76. note "Communicating at 4800 bps" 2
  77. CommunicatingAt 4800
  78. jump 20
  79. !
  80. @LABEL 14
  81. note "Communicating at 7200 bps" 2
  82. CommunicatingAt 7200
  83. jump 20
  84. !
  85. @LABEL 15
  86. note "Communicating at 9600 bps" 2
  87. CommunicatingAt 9600
  88. jump 20
  89. !
  90. @LABEL 16
  91. note "Communicating at 12000 bps" 2
  92. CommunicatingAt 12000
  93. jump 20
  94. !
  95. @LABEL 17
  96. note "Communicating at 14400 bps" 2
  97. CommunicatingAt 14400
  98. jump 20
  99. !
  100. ! Now CONNECTed.  Change to Hardware Handshaking
  101. !
  102. @LABEL 20
  103. pause 30
  104. HSReset 0 1 0 0 0 0
  105. ifANSWER 22
  106. pause 30
  107. !
  108. ! Finished. Return with good results
  109. @LABEL 22
  110. sound Sunrise
  111. exit 0
  112. !
  113. ! @ANSWER
  114. ! Set up the modem to answer
  115. !
  116. @LABEL 30
  117. write "ATS0=1\13"
  118. matchstr 1 31 "OK\13\10"
  119. matchread 30
  120. jump 59
  121. !
  122. @LABEL 31
  123. matchstr 1  32 "RING\13\10"
  124. matchstr 2  11 "CARRIER 1200\13\10"
  125. matchstr 3  12 "CARRIER 2400\13\10"
  126. matchstr 4  13 "CARRIER 4800\13\10"
  127. matchstr 5     14 "CARRIER 7200\13\10"
  128. matchstr 6  15 "CARRIER 9600\13\10"
  129. matchstr 7     16 "CARRIER 12000\13\10"
  130. matchstr 8  17 "CARRIER 14400\13\10"
  131. matchstr 9  50 "NO CARRIER\13\10"
  132. matchstr 10    50 "ERROR\13\10"
  133. matchstr 11    52 "NO DIALTONE\13\10"
  134. matchstr 12    53 "BUSY\13\10"
  135. matchstr 13 54 "NO ANSWER\13\10"
  136. matchread 700
  137. jump 31
  138. !
  139. @LABEL 32
  140. userhook 1
  141. note "Answering phone…" 2
  142. jump 31
  143. !
  144. ! 50: error messages
  145. !
  146. @LABEL 50
  147. sound Doh!
  148. note "*** No Carrier/Error ***"
  149. pause 15
  150. exit -6021
  151. !
  152. @LABEL 52
  153. sound Doh!
  154. note "*** No Dialtone ***"
  155. pause 15
  156. exit -6020
  157. !
  158. @LABEL 53
  159. sound Doh!
  160. note "*** Busy ***"
  161. pause 15
  162. exit -6022
  163. !
  164. @LABEL 54
  165. sound Doh!
  166. note "*** No Answer ***"
  167. pause 15
  168. exit -6023
  169. !
  170. @LABEL 59
  171. sound Doh!
  172. note "*** Error ***"
  173. exit -6019
  174. !
  175. ! Hang up the modem
  176. !
  177. @HANGUP
  178. @LABEL 60
  179. settries 0
  180. HSReset 0 0 0 0 0 0 
  181. @LABEL 61
  182. write "ATH\13"
  183. matchclr
  184. matchstr 1 62 "NO CARRIER\13\10"
  185. matchstr 2 62 "OK\13\10"
  186. matchstr 3 62 "ERROR\13\10"
  187. matchread 30
  188. inctries
  189. iftries 3 62
  190. ! no response, try escape sequence
  191. pause 12
  192. write "+++"
  193. matchclr
  194. matchstr 1 61 "OK\13\10"
  195. matchread 18
  196. ! try dropping DTR
  197. DTRClear
  198. pause 15
  199. DTRSet
  200. pause 15
  201. jump 61
  202. !
  203. @LABEL 62
  204. ! recall the factory settings
  205. pause 15
  206. write "AT&F1\13"
  207. matchclr
  208. matchstr 1 63 "OK\13\10"
  209. matchread 30
  210. !
  211. @LABEL 63
  212. pause 5
  213. matchstr 1 64 "OK\13\10"
  214. write "ATS0=0\13"
  215. matchread 20
  216. !
  217. @LABEL 64
  218. exit 0
  219.  
  220.